#ifndef __HALALGSM1_H__
#define __HALALGSM1_H__

	#define HALALGSM1_MODE_ECB	0x00000101L 
	#define HALALGSM1_MODE_CBC	0x00000102L 
	#define HALALGSM1_MODE_CFB	0x00000104L 
	#define HALALGSM1_MODE_OFB	0x00000108L 

	extern UINT32 HalAlgSM1_Init(UINT8 Key[], UINT8 IV[]); 
	extern UINT32 HalAlgSM1_Encrypt_Update(UINT32 Mode, UINT8 *pInBuf, UINT16 nSize, UINT8 *pOutBuf); 
	extern UINT32 HalAlgSM1_Decrypt_Update(UINT32 Mode, UINT8 *pInBuf, UINT16 nSize, UINT8 *pOutBuf); 
	extern UINT32 HalAlgSM1_Final(void); 

	extern UINT32 HalAlgSM1Mac_Init(UINT8 IV[], UINT8 Key[]);
	extern UINT32 HalAlgSM1Mac_Update(UINT8 *pBuf, UINT16 nSize); 
	extern UINT32 HalAlgSM1Mac_Final(UINT8 *pMac);

#endif
